<?php
if(!defined('BZ_XTBLOG')){
    exit('Access Denied!');
}
################################################
if(Bingz_config('Bingz_renew_time_fz10') < $time ){
    $sqlc=$db->query('user',"`time_a` < $time ",'uid');
    while($wwaag=mysql_fetch_array($sqlc)){
   	      $db->update('user',array('user_zx' => 0)," `uid` ='$wwaag[uid]'");
    }
    
    
    $timesj=strtotime(date("Y-m-d H:i:s",strtotime("+10 minute")));
    Bingz_config('Bingz_renew_time_fz10',$timesj,'post');
}
###############################################
if(Bingz_config('Bingz_renew_time_fz60') < $time ){
   
   
   
   
   $timesj=strtotime(date("Y-m-d H:i:s",strtotime("+60 minute")));
   Bingz_config('Bingz_renew_time_fz60',$timesj,'post');
}
###############################################
if(Bingz_config('Bingz_renew_time_xs24') < $time ){
	  if($logindl=Bingz_config('system_config_login_dl')){
		   $time_asj=strtotime($time_now,strtotime("-".$logindl." day"));
		   $db->delete('user_dl',"`type` ='0' AND `time_a` < '$time_asj'");
	  }
############
    $db->delete('website_userdt',"`time_b` < $time_jt ");
############
    $sqlc=$db->query('forum_class'," ",'id');
    while($wwaag=mysql_fetch_array($sqlc)){
   	      $sjtz=$db->num_rows('forum'," `cid` ='$wwaag[id]' AND `sz_sc` ='0'",'id');
          $sql_c=$db->query('forum'," `cid` ='$wwaag[id]' ORDER BY `id` ","");
          $sjhf='0';
          while($row_ac=mysql_fetch_array($sql_c)){
          	    $sjhf=$sjhf+$row_ac[hfs];
    	    }
   	    $sjgsj=$sjtz+$sjhf;
   	    $db->update('forum_class',array('tzszj' => 0,'tzsz' => $sjgsj,'tzst' => $sjtz,'tzsh' => $sjhf)," `id` ='$wwaag[id]'");
    }
    $sql=$db->query('user'," ",'');
    while($waw=mysql_fetch_array($sql)){
          $mmm=md5("$waw[pwss]$time");
          $db->update('user',array('pwss' => $mmm , 'user_q_tgs' => 0)," `uid`= '$waw[uid]'");
    }
############
	       $cn=curl_init();
         curl_setopt($cn,CURLOPT_URL,''.$Bingz_url_upgrade.'/Bingz_report.php?url='.$httpurl.'&url_b='.$url_b.'&ip='.$ip.'&bvb='.$bzxtvbb.'');
         curl_setopt($cn,CURLOPT_RETURNTRANSFER,1);
         $content=curl_exec($cn);
         curl_close($cn);
         if(!$content){
        	   $content=@file_get_contents(''.$Bingz_url_upgrade.'/Bingz_report.php?url='.$httpurl.'&url_b='.$url_b.'&ip='.$ip.'&bvb='.$bzxtvbb.'');
         }

   $timesj=strtotime(date("Y-m-d 00:00:00",strtotime(" +1 day")));
   Bingz_config('Bingz_renew_time_xs24',$timesj,'post');
}
###############################################
if(Bingz_config('Bingz_renew_time_ts30') < $time ){
   $timesj=strtotime(date("Y-m-d 00:00:00",strtotime(" +30 day")));
   Bingz_config('Bingz_renew_time_ts30',$timesj,'post');
}
?>